home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / snip9_91.arc / DRVALID.TXT < prev    next >
Internet Message Format  |  1991-09-17  |  980b

  1. From:    Darius Thabit 
  2. To:      George Kamenz                            Msg #299, 04-Nov-88 07:03.00
  3. Subject: drives
  4.  
  5. > How can one check ... a logical drive?
  6.  
  7.    I've commented on this at length before so I'll just outline it.
  8. To see if a drive exists (is recognized by DOS): using DOS functions
  9. 0Eh and 19h, save the current drive, try to make the candidate
  10. drive the current drive, then read the current drive to see if
  11. it was successful (then restore the current drive); for DOS 3.0+
  12. just use function 44h subfunction 09h; neither requires disk I/O.
  13.    To see if an existing drive is ready, use DOS interrupt 25h
  14. to try to read one absolute sector (say sector 0); if you're
  15. feeling lucky you can test for write-protect by writing it back
  16. with int 26h (but I would not use the boot sector in this case);
  17. neither of these will result in an "Abort ..." message.
  18.  
  19. --- QuickBBS v2.03
  20.  * Origin: <The ToolBox>  Boston, Mass  [MABOS] 617-364-2474 (1:101/160)
  21.